﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Meqs.Entity;
using Meqs.Logic.Interface;
using System.Collections.Generic;

public partial class TeacherEval_School_ScoreInput_SelectCauseTeacher : System.Web.UI.Page
{
    protected int selectCause = 0;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnBind_Click(object sender, EventArgs e)
    {
        int id = Convert.ToInt32( Request.Form[CauseID.UniqueID].ToString());
        Hashtable ht = new Hashtable();
        ht.Add("CauseID", id);
        Repeater1.DataSource = Container<ITeacherEvalDesLogic>.Instance.FindCauseTeacher(ht);
        Repeater1.DataBind();
    }

    protected string GetCauseStr()
    {
        string str = "";
        IList<GlobalCauseInfo> list = Container<IGlobalCauseInfoLogic>.Instance.SelectSchoolCause(CommonScore.GetSchoolMark, 1);
        foreach (GlobalCauseInfo g in list)
        {
            str += "<option value=" + g.RID + "  >" + g.CauseName + "</option>";
        }
        if(list.Count>0)
        {
            CauseID.Text = list[0].RID.ToString();
            selectCause = list[0].RID;
        }
        return str;
    }
}
